package com.github.binarywang.demo.wx.mp.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import com.github.binarywang.demo.wx.mp.utils.WeChatTemplateMsgUtils;

/**
 * 测试地址
 * https://{domain}/wx/sendmsg/send
 * 
 * @author hanmanyi
 */
@Controller
@RequestMapping("/wx/sendmsg")
public class WxSendMsgController {
	
	@Autowired
    private  WeChatTemplateMsgUtils weChatTemplateMsgUtils;

    @GetMapping("/send")
    public String send() {
        try {
        	String toUser = "oqHAt61EGkAZl02cCGpcvcZHI30Y";//消息接受者-openID
        	weChatTemplateMsgUtils.manuscriptExamine(toUser);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return "success";
    }
}
